package com.ynkbny.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

/**
 * 属性的历史数据-实体
 *
 * @author : juzipi123
 * @date : 2023-7-26
 */
@ApiModel(value = "属性的历史数据", description = "")
@TableName("device_history_data")
@Data
public class DeviceHistoryData implements Serializable {

    private static final long serialVersionUID = -4101701119760124294L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

     /**
     * 设备ID 
     */
    @ApiModelProperty(value = "设备ID", example = "")
    @TableField(value = "deviceId")
    private String deviceId;
    
    /**
     * 时间戳
     */
    @ApiModelProperty(value = "时间戳", example = "")
    @TableField(value = "timeStamp")
    private String timeStamp;
    
    /**
     * 数据 
     */
    @ApiModelProperty(value = "数据", example = "")
    @TableField(value = "data")
    private String data;
    
    /**
     * 属性flag
     */
    @ApiModelProperty(value = "多个属性flag(可选,不填查询设备下所有参数)", example = "")
    private String metric;

    public DeviceHistoryData() {
    }

    public DeviceHistoryData(String deviceId, String metric) {
        this.deviceId = deviceId;
        this.metric = metric;
    }
}